/**
 * 安知鱼主题全局样式
 * 精简版，保持官方设计风格
 */

@import './variables.css';

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 2;
  /* color: var(--anzhiyu-fontcolor); */
  /* background: var(--anzhiyu-background); */
  min-height: 100vh;
  overflow-x: hidden;
  font-size: var(--global-font-size);
  margin: 0;
  padding: 0;
}

/* 基础动画 */
@keyframes slide-in {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--anzhiyu-main-op);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--anzhiyu-main-op-deep);
}

/* 选中文本样式 */
::selection {
  background: var(--anzhiyu-main-op);
  color: white;
}

::-moz-selection {
  background: var(--anzhiyu-main-op);
  color: white;
}

/* 图片禁用拖拽 */
img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* 链接样式 */
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--anzhiyu-main);
}

/* 按钮基础样式 */
.btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--anzhiyu-main);
  color: var(--anzhiyu-white);
  box-shadow: var(--anzhiyu-shadow-main);
}

.btn-primary:hover {
  background: var(--anzhiyu-main-op-deep);
  transform: translateY(-2px);
}

/* 卡片基础样式 */
/* .card {
  border-radius: 24px;
  background: var(--anzhiyu-card-bg);
  border: var(--style-border-always);
  box-shadow: var(--anzhiyu-shadow-border);
  padding: 1rem 2rem;
  transition: all 0.3s ease;
} */

/* 此处代码影响teek博主信息卡片圆角样式 */
/* .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--anzhiyu-shadow-blackdeep);
} */

/* 标题样式 */
.title {
  font-weight: 700;
  /* color: var(--anzhiyu-fontcolor); */
  line-height: 1.2;
}

#site-name .title:hover{
  color: #ffffff;
}
.title-large {
  font-size: 2em;
  margin: 0.67em 0;
}

.title-medium {
  font-size: 1.5em;
  margin: 0.5em 0;
}

.title-small {
  font-size: 1.2em;
  margin: 0.4em 0;
}

/* 文本工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-secondary {
  color: var(--anzhiyu-secondtext);
}

.text-muted {
  color: var(--anzhiyu-gray);
}

/* 布局工具类 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

/* 间距工具类 */
.m-0 { margin: 0; }
.m-1 { margin: 0.5rem; }
.m-2 { margin: 1rem; }
.m-3 { margin: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* 响应式隐藏类 */
@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hidden-desktop {
    display: none !important;
  }
}

/* 加载状态 */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--anzhiyu-main);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}